import React from 'react'
import { Button,Form, Input} from 'antd';

function Search(props) {
    const {searchForm,onFinish,onFinishFailed,reset}=props
    return (
        <div>
            <Form
                form={searchForm}
                layout='inline'
                name="basic"
                labelCol={{ span: 8 }}
                wrapperCol={{ span: 16 }}
                style={{ maxWidth: 600 }}
                initialValues={{ remember: true }}
                onFinish={onFinish}
                onFinishFailed={onFinishFailed}
                autoComplete="off"
            >
                <Form.Item
                    label="搜索"
                    name="keyword"
                >
                    <Input />
                </Form.Item>

                <Form.Item label={null}>
                    <Button type="primary" htmlType="submit">
                        查询
                    </Button>
                </Form.Item>

                <Form.Item label={null}>
                    <Button type="primary" onClick={() => reset()}>
                        重置
                    </Button>
                </Form.Item>
            </Form>
        </div>
    )
}

export default Search
